<div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="index.html">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">片库管理</span></div>
        </div>
      

        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th>影片id</th>
							<th>影片标题</th>
							<th>发布时间</th>
							<th>影片时间</th>
							<th>上传人</th>
                            <th>操作</th>
                        </tr>
                        <foreach name="re" item="v">
                        <tr>
                           <td>{$v.id}</td>
						   <TD>
						   	   <a onclick="datu({$v.id})" style="cursor:pointer;">
								 {$v.title}
							   </a>
						  
						   </TD>
						   <td>{$v.time|date="Y-m-d H:i:s",###}</td>
						   <td>{$v.vtime}</td>
						   <td>
						   <if condition="$v.type eq 1">

                            管理员
                            <else/>
						   {$v.username}
						   </if>
						   </td>
						   <td>
						     
						      <a onclick="del({$v.id})" style="cursor:pointer;">删除</a>
							 
							  
						   </td>
                        </tr>
						</foreach>
                    </table>
                    <div class="list-page"> {$page}</div>
                </div>
            </form>
        </div>
    </div>
	<script>
	  
	  function del(i){
	 
	    if(confirm('您确定删除吗')){
		  
		  $.post("{:U('Pianku/del')}",{"id":i},function(re){
		  
		     if(re==1){
			 
			   alert('删除成功');
			   
			   location.reload();
			 
			 }else{
			 
			   alert('删除失败');
			 
			 }
		  
		  
		  
		  })
		  
		
		}
	  
	  }
	  
	    function datu(i){
			  layer.open({
				  type: 2,
				  title: '视频详情',
				  shadeClose: true,
				  shade: 0.8,
				  area: ['80%', '90%'],
				  content: '{:U("Pianku/big")}?id='+i //iframe的url
				}); 
			}
	
	</script>
	